package com.eshop.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.eshop.mapper.RoleMapper;
import com.eshop.pojo.Role;
import com.eshop.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 角色表(Role)表服务实现类
 *
 * @author makejava
 * @since 2024-01-17 11:35:24
 */
@Service("roleService")
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    @Autowired
    RoleMapper roleMapper;
    public Role getRoleByUid(Integer uid) {
        return roleMapper.getByUid(uid);
    }

    @Override
    public Role getRoleByResourceId(Long reId) {
        return roleMapper.getByResourceId(reId);
    }
}

